package com.jhws.common.pay.bo;

import javax.persistence.*;
import java.util.Date;

@Table(name = "pay_order")
@Entity
public class Order {

    /**
     * 订单id
     */
    @Id
    @Column(name = "id")
    Long id;

    /**
     * 客户id id
     */
    @Column(name = "custom_id")
    private Long customId;

    /**
     * 业主编号
     */
    @Column(name = "owner_code")
    private String ownerCode;

    /**
     * 小区编号
     */
    @Column(name = "comm_code")
    private String commCode;

    /**
     * 订单金额
     */
    @Column(name = "payable_fee")
    private String payableFee;

    /**
     * 实付金额
     */
    @Column(name = "total_fee")
    private String totalFee;

    /**
     * 支付类型，微信还是支付宝
     */
    @Column(name = "pay_type")
    private String payType;

    /**
     * 订单类型，停车缴费还是物业缴费等
     */
    @Column(name = "order_type")
    private String orderType;

    /**
     * 支付模块，也就是支付大类别，比如停车缴费，包含月卡缴费，临时车缴费等
     */
    @Column(name = "pay_module")
    private String payModule;

    /**
     * 订单状态，已支付还是未支付
     */
    @Column(name = "order_state")
    private int orderState;

    /**
     * 订单私有数据,根据orderType不同存放的数据不同
     *
     * 停车缴费存放车牌号，物业缴费存放小区编号
     */
    @Column(name = "attach")
    private String attach;

    /**
     * 订单私有数据2，方便查询
     */
    @Column(name = "attach2")
    private String attach2;
    /**
     * 订单描述
     * 停车缴费可以放停车场信息，物业缴费可以放支付月数等
     */
    @Column(name = "body")
    private String body;

    /**
     * 订单详情
     * 详细描述信息
     */
    @Column(name = "detail")
    private String detail;

    /**
     * 下单时间
     */
    @Column(name = "time")
    private Date time;

    public Long getId() { return id; }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCustomId() {
        return customId;
    }

    public void setCustomId(Long customId) {
        this.customId = customId;
    }

    public String getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(String totalFee) {
        this.totalFee = totalFee;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public Date getTime() { return time; }

    public void setTime(Date time) { this.time = time; }

    public String getOrderType() { return orderType; }

    public void setOrderType(String orderType) { this.orderType = orderType; }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getCommCode() {
        return commCode;
    }

    public void setCommCode(String commCode) {
        this.commCode = commCode;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getAttach2() {
        return attach2;
    }

    public void setAttach2(String attach2) {
        this.attach2 = attach2;
    }

    public String getPayableFee() {
        return payableFee;
    }

    public void setPayableFee(String payableFee) {
        this.payableFee = payableFee;
    }

    public String getPayModule() {
        return payModule;
    }

    public void setPayModule(String payModule) {
        this.payModule = payModule;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", customId=" + customId +
                ", ownerCode='" + ownerCode + '\'' +
                ", commCode='" + commCode + '\'' +
                ", payableFee='" + payableFee + '\'' +
                ", totalFee='" + totalFee + '\'' +
                ", payType='" + payType + '\'' +
                ", orderType='" + orderType + '\'' +
                ", orderState=" + orderState +
                ", attach='" + attach + '\'' +
                ", attach2='" + attach2 + '\'' +
                ", body='" + body + '\'' +
                ", detail='" + detail + '\'' +
                ", time=" + time +
                '}';
    }
}
